package com.cheng.xbsc.service;

import com.cheng.xbsc.entity.User;
import com.cheng.xbsc.entity.vo.Result;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

public interface UserService {

    Result findByUsername(String username);

    Result findByEmail(String email);

    void save(User user);

    Result sendCode(String email);

    Result forget(String code, User user);

    Result login(String code, User user);

    User findById(Integer userId);

    Result uploadPic(MultipartFile file) throws IOException;

    User updateUser(User user);

    Result updatePassword(String oldPassword, String newPassword);

    void loginOut();

    User findByWxOpenid(String openid);

}
